#1）将字符串"askdsdfjas"中的所有字符a转变成A
a="askdsdfjas"
print(a.replace('a','A'))
#2）打印26个英文字母，大写
#方法一
b="abcdefghijklmnopqrstuvwxyz"
print(len(b))
print(b.upper())
#方法二
print(ord('A'))
print(ord('Z'))
for b1 in range(65,91):
    print(chr(b1),end='')
print()

#3）从句子中提取所有长度大于3的单词
#"The gentle breeze carried the sweet scent of blooming flowers through the quiet garden."
a="The gentle breeze carried the sweet scent of blooming flowers through the quiet garden"
p=a.split()
for p1 in p:
    if len(p1)>3:
        print(p1,end=',')
print()

#4）字典：dict1 = dict2 = {1:"张三",2:"lisi",3:"lily",4:"lucy",5:"张三",6:"lily",7:"lisi"}
#     根据上面字典的元素，生成要给新字典，要求：新字典的key为name  value为name出现的次数
#    并且打印输出，格式为：
#   名字张三有x个
#    名字lisi有x个
 #   。。。
dict1 = {1: "张三", 2: "lisi", 3: "lily", 4: "lucy", 5: "张三", 6: "lily", 7: "lisi"}
dict2={}
a=list(dict1.values())
for b in a:
    dict2[b]=a.count(b)
print(dict2)
for k,v in dict2.items():
    print(f'名字{k}有{v}个')
